﻿#ifndef ROBOT_TYPE_H
#define ROBOT_TYPE_H

//空间直角坐标
struct RobotPoseXYZ {

    float x;
    float y;
    float z;
    float rx;
    float ry;
    float rz;


   void operator= (const RobotPoseXYZ& pose){
        this->x = pose.x;
        this->y = pose.y;
        this->z = pose.z;
        this->rx = pose.rx;
        this->ry = pose.ry;
        this->rz = pose.rz;
    }
};

//关节坐标
struct RobotPoseJoint{

    float joint1;
    float joint2;
    float joint3;
    float joint4;
    float joint5;
    float joint6;

    void operator= (const RobotPoseJoint& pose){
         this->joint1 = pose.joint1;
         this->joint2 = pose.joint2;
         this->joint3 = pose.joint3;
         this->joint4 = pose.joint4;
         this->joint5 = pose.joint5;
         this->joint6 = pose.joint6;
    }
};

//位姿类型
enum class PoseType{
    JOINT, //关节坐标
    XYZ //空间直角坐标
};

//移动类型
enum class MoveType{
    JOINT, //关节运动
    LINE //直线运动
};

//阻塞类型
enum class BlockMotion{
    LOCKED, //确定阻塞
    UNLOCKED //不阻塞
};


namespace robot {

//speed
#define SPEED_1_5 1.5   //
#define SPEED_5   5.0   //
#define SPEED_10  10.0   // e
#define SPEED_20  20.0   // e
#define SPEED_30  30.0   // e
#define SPEED_40  40.0   // e
#define SPEED_50  50.0   // e
#define SPEED_60  60.0   // e
#define SPEED_70  70.0   // e
#define SPEED_80  80.0   // e
#define SPEED_90  90.0   // e
#define SPEED_100 100.0   // e


enum Acceleration{
    ACC_5 = 5, //
    ACC_10 = 10, //
    ACC_20 = 20, //
    ACC_30 = 30, //
    ACC_40 = 40, //
    ACC_50 = 50, //
    ACC_60 = 60, //
    ACC_70 = 70, //
    ACC_80 = 80, //
    ACC_90 = 90, //
    ACC_100 = 100, //
};

enum Deceleration{
    DEC_5 = 5, //
    DEC_10 = 10, //
    DEC_20 = 20, //
    DEC_30 = 30, //
    DEC_40 = 40, //
    DEC_50 = 50, //
    DEC_60 = 60, //
    DEC_70 = 70, //
    DEC_80 = 80, //
    DEC_90 = 90, //
    DEC_100 = 100, //
};

}

#endif // ROBOT_TYPE_H

